visRgn
GrafPort structure
#include <Quickdraw.h>
typedef struct GrafPort { Size Offset Description
short device; 2 0 Device-specific info; 0=screen
BitMap portBits; 14 2 baseAddr, rowBytes, bounds
Rect portRect; 8 16 Writeable interior PortSize,
RgnHandle visRgn; 4 24 Portion not covered by other
windows
RgnHandle clipRgn; 4 28 User-definable clipping region
Pattern bkPat; 8 32 Background pattern BackPat
Pattern fillPat; 8 40 Fill pattern FillRect, FillOval,...
Point pnLoc; 4 48 Pen location in local coords
MoveTo,...
Point pnSize; 4 52 .v=height, .h=width of pen PenSize
short pnMode; 2 56 Transfer Mode; patCopy, PenMode
Pattern pnPat; 8 58 Pattern used in drawing PenPat
short pnVis; 2 66 If <0, pen is invisible HidePen,
short txFont; 2 68 Font; 0= system, 1= application
Style txFace; 2 70 Text style; bold, italic, TextFace
char filler;
short txMode; 2 72 Transfer Mode; srcOr, srcXor,
short txSize; 2 74 Text size in points TextSize
Fixed spExtra; 4 76 Spacing for full justification
long fgColor; 4 80 Old-model color for foreground
long bkColor; 4 84 Old-model color for background
short colrBit; 2 88 Old-model color plane ColorBit
short patStretch; 2 90 Used internally; printer aspect ratio
adjustment
Handle picSave; 4 92 PicHandle if pict being saved
Handle rgnSave; 4 96 RgnHandle if region is being saved
Handle polySave; 4 100 PolyHandle if polygon being saved
QDProcsPtr grafProcs; 4 104 Addr of struct with addresses of
custom routines
} GrafPort; 108
typedef GrafPort *GrafPtr;

Notes: The GrafPort structure is used indirectly in virtually every Quickdraw,
Window Manager, Dialog Manager, etc. function. A GrafPtr is used directly
in calls to:
InitGraf InitPort ClosePort SetPort GetPort
Calls to NewWindow (GetNewWindow) and NewDialog
(GetNewDialog) et al., allocate and initialize a GrafPort as part of a
The Quickdraw variable thePort is a pointer to the current active grafPort.
A NIL (0) value in picSave, rgnSave, or polySave indicates that no picture
(or region or polygon) recording is currently taking place. A NIL value in
grafProcs indicates that the standard routines will handle all Quickdraw
functions.